<?php
require_once 'util/class.constants.php';
require_once 'service/class.userservice.php';

$service = new UserService();

// 1. test resigter
// for($i=0; $i<100; $i++) {
// $result = $service->register('test'.$i, 'test'.$i.'@163.com', 
// 		'test'.$i, 0, 0);
// echo json_encode($result)."/n";
// }
// 2. test logout
// $result = $service->logout(3, '4dafd2ccbbd3bb2af6d601c99a24ca02');

// 3. test login
// $result = $service->login(3, 'test11zz');

// 4. test modify profile
// $result=$service->modifyProfile(3, 'bb3', null, '1990-01-01', 'hello world');

// 5. test get basic info
// $result = $service->getUserBasicInfo(3);
// echo(json_encode($result));

// $result='simon@163.com';
// echo urlencode($result);

// 6. test get basic info by nick
$result = $service->getUserBasicInfoByName('test5');
echo(json_encode($result));